/**
 * FileFind - ftp/shares indexing and search php engine
 * Module: agent-java
 * Description: Agent written in java language
 * Copyright (c) 2003-2010 Rage Steel, www.gt2.ru
 * ----------------------------------------------
 * $Id$
 */
package ru.ffind.agent.io;

import java.io.File;
import java.util.Date;

import ru.ffind.common.model.AbstractEntry;

/**
 * 
 * Base implementation for java.io.File-based implementations of Directory
 *
 * @author Rage Steel
 * @version $Id$
 *
 */
abstract public class AbstractFileEntry extends AbstractEntry {

	private final String name;
	private final Date datetime;

	protected AbstractFileEntry(File entry) {
		super();
		this.name = entry.getName();
		this.datetime = new Date(entry.lastModified());
	}
	
	@Override
	public String getName() {
		return name;
	}

	@Override
	public Date getDatetime() {
		return datetime;
	}

}